-- GENERATED SPELL FOR [Wildpaw Mystic] --


function spell0_11838(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(37361,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11838', 1000, 1)
end

function spell1_11838(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(12058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11838', 3000, 1)
end

function spell2_11838(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_11838', 3000, 1)
end

function Sorts_11838(pUnit, Event)
local choix_sorts_11838 = math.random(0, 2)
if choix_sorts_11838 == 0 then
pUnit:RegisterEvent('spell0_11838', 1, 1)
end
if choix_sorts_11838 == 1 then
pUnit:RegisterEvent('spell1_11838', 1, 1)
end
if choix_sorts_11838 == 2 then
pUnit:RegisterEvent('spell2_11838', 1, 1)
end
end

function mob11838_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11838', math.random(1500, 3000), 1)
end

function mob11838_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11838_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11838_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11838, 1, 'mob11838_Action')
RegisterUnitEvent(11838, 2, 'mob11838_Leave')
RegisterUnitEvent(11838, 3, 'mob11838_Kill')
RegisterUnitEvent(11838, 4, 'mob11838_Die')
